package com.demo.zhihu.model;

import java.util.Date;

import org.apache.ibatis.type.Alias;

@Alias("Question")
public class Question {
     private int id;
     private int asker;
     //问题标题
     private String title;
     //问题描述
     private String summary;
     //提交回答的次数
     private int answers;
     private Date date;
    public Question() {};
    public Question(int id,int answers) {
    	this.id = id;
    	this.answers = answers;
    };
    @Override
	public String toString() {
		return "Question [id=" + id + ", asker=" + asker + ", title=" + title + ", summary=" + summary + ", answers="
				+ answers + ", date=" + date + "]";
	}
	public Question(int asker, String title,String summary) {
    	this.asker = asker;
    	this.title = title;
    	this.summary = summary;
    };
	public int getId() {
		return id;
	}
	public int getAnswers() {
		return answers;
	}
	public void setAnswers(int answers) {
		this.answers = answers;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getAsker() {
		return asker;
	}
	public void setAsker(int asker) {
		this.asker = asker;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
     
}
